<{include file="public/header.html"}>
		<div class="xinsu-right">
			<div class="xinsu-right-content">
				<div class="xinsu-data-content">
					<div class="xinsu-title">
						<span class="layui-breadcrumb">
							<a><cite>当前位置</cite></a>
							<a><cite>用户平仓</cite></a>
						</span>
					</div>
					<form class="layui-form xinsu-form" action="" method="get">
						<div class="layui-form-item">
						    <div class="layui-inline">
						      	<label class="layui-form-label xinsu-form-label">账号类型</label>
						      	<div class="layui-input-inline xinsu-input-inline">
							        <select name="demo_account">
										<option value="2">全部</option>
										<option value="0" <{if $demo_account == 0}>selected<{/if}>>正式</option>
										<option value="1" <{if $demo_account == 1}>selected<{/if}>>试玩</option>
									</select>
						        </div>
						    </div>
							<div class="layui-inline">
						      	<label class="layui-form-label xinsu-form-label">股票类型</label>
						      	<div class="layui-input-inline xinsu-input-inline">
							        <select name="bull_type">
										<option value="0">全部</option>
										<option value="1" <{if $bull_type == 1}>selected<{/if}>>融资</option>
										<option value="2" <{if $bull_type == 2}>selected<{/if}>>融券</option>
									</select>
						        </div>
						    </div>
							
							 <div class="layui-inline">
						      	<label class="layui-form-label xinsu-form-label">查询日期</label>
						      	<div class="layui-input-inline">
						        	<input type="text" name="start_time" placeholder="开始日期" autocomplete="off" class="layui-input" onclick="layui.laydate({elem: this})" value="<{if $start_time != '0'}><{$start_time}><{/if}>">
						      	</div>
						      	<label class="layui-form-label xinsu-form-label2">至</label>
						      	<div class="layui-input-inline">
						        	<input type="text" name="end_time" placeholder="结束日期" autocomplete="off" class="layui-input" onclick="layui.laydate({elem: this})" value="<{if $end_time != '0'}><{$end_time}><{/if}>">
						      	</div>
						    </div>
						    <div class="layui-inline">
						    	<label class="layui-form-label xinsu-form-label">搜索条件</label>
								<div class="layui-input-block xinsu-input-block2">
								    <input type="text" name="username" value="<{if $username != '0'}><{urldecode($username)}><{/if}>" class="layui-input" placeholder="帐号 / 真实姓名"/>
								</div>
						    </div>
						   <button class="layui-btn xinsu-btn">查询</button>
							<span>记录总数：共 <{$total}> 条</span>
						</div>
					</form>
					<div class="layui-form xinsu-form">
						<table class="layui-table">
							<thead>
								<tr>
									<th>ID</th>
									<th>帐号</th>
									<th>平仓单号</th>
									<th>代码/名称</th>
									<th>建仓时间</th>
									<th>入价</th>
									<th>平仓时间</th>
									<th>出价</th>
									<th>股票类型</th>
									<th>数量</th>
									<th>手续费</th>
									<th>留仓天/费</th>
									<th>管理费</th>
									<th>印花税</th>
									<th>盈亏</th>
								</tr> 
							</thead>
							<tbody>
								<{if empty($list) == false}>
								<{foreach $list as $val}>
								<tr>
									<td><{$val.id}></td>
									<td><a class="xinsu-fontcolor-blue xinsu-user" href="javascript:;" data="<{$val.uid}>"><{$val.username}></a></td>
									<td><{$val.order_no}></td>
									<td><a class="xinsu-fontcolor-blue xinsu-stock-figure" href="javascript:;" data="<{$val.stock}>"><{$val.stock}>/<{$val.stock_name}></a></td>
									<td><{date("Y-m-d H:i:s", $val["bull_time"])}></td>
									<td><{$val.bull_price}></td>
									<td><{date("Y-m-d H:i:s", $val["sell_time"])}></td>
									<td><{$val.sell_price}></td>
									<{if $val.sell_type == 1}>
									<td class="xinsu-fontcolor-red">融资↑</td>
									<{else}>
									<td class="xinsu-fontcolor-green">融券↓</td>
									<{/if}>
									<td><{$val.sell_num}></td>
									<td>-<{$val.cost}></td>
									<td><{$val.save_money}>/<{$val.save_day}>天</td>
									<td>-<{$val.manage_money}></td>
									<td>-<{$val.stamp_money}></td>
									<{if $val.total_gain < 0}>
									<td class="xinsu-fontcolor-green"><{$val.total_gain}></td>
									<{else}>
									<td class="xinsu-fontcolor-red"><{$val.total_gain}></td>
									<{/if}>
								</tr>
								<{/foreach}>
								<tr>
						        	<td colspan="15">
										平仓手续费合计(总)：￥<{$count.cost}>
										&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
										留仓费合计(总)：￥-<{$count.save_money}>	
										&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
										平仓盈亏合计(总)：￥<{if $count.total_gain < 0}><a class="xinsu-fontcolor-green"><{$count.total_gain}></a><{else}><a class="xinsu-fontcolor-red"><{$count.total_gain}></a><{/if}>
									</td>
						        </tr>
								<{else}>
								<tr>
									<td colspan="14">暂无数据</td>
								</tr>
								<{/if}>
							</tbody>
						</table>
					</div>
					<div class="xinsu-page">
						<div class="xinsu-show">
							<{$page}>
						</div>
						<div class="xinsu-clear"></div>
					</div>
				</div>
			</div>
		</div>
<{include file="public/footer.html"}>
